/*
 * @Author: wangjq4214
 * @Date: 2022-04-17 10:47:07
 * @LastEditTime: 2022-05-24 20:55:55
 * @LastEditors: wangjq4214
 */
package main

// follower 节点注册时通过管道传递的数据
type RegisterBody struct {
	IP           string
	CPUTotal     int32
	CPUMax       int32
	CPUUsing     int32
	CPUWait      int32
	StorageTotal int32
	StorageUsing int32
	Time         int64

	Task []*Task
}

type DataPosition struct {
	ID int32
	IP string
}

// 任务定义
type Task struct {
	UUID string `yaml:"UUID"`

	CPU     int   `yaml:"CPU"`
	Storage int   `yaml:"Storage"`
	Time    int64 `yaml:"Time"`
	Need    bool  `yaml:"Need"`
	Point   string

	CommitTime  int64
	AssignTime  int64
	ReceiveTime int64
	StartTime   int64
	FinishTime  int64
	ReadyTime   int64

	Position DataPosition
}
